/*
 * @Description: 
 * @Author: 黄勇
 * @LastEditors: 黄勇
 * @Date: 2019-03-19 17:10:50
 * @LastEditTime: 2020-03-29 21:17:21
 */

import Vue from "vue";
import Vuex from "vuex";
import typeEnumPlugin from './typeEnumPlugin';
import createPersistedState from "vuex-persistedstate"
import common from './modules/components/common'
import user from './modules/components/user'
Vue.use(Vuex);

let store = new Vuex.Store({
    modules: {
        // test: a,
        // test1: b,
        user,
        common
    },
    plugins: [typeEnumPlugin, createPersistedState({
        //todo:看情况是否需要全部存储,,还是只存储一小部分...
        storage: window.localStorage,
        // reducer(store) {
        //     return {
        //         "user": store.user
        //     }
        // }
    })]
})

export default store